xend: fix domain_migrate
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 4 Sep 2009 07:34:45 +0000 (08:34 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 4 Sep 2009 07:34:45 +0000 (08:34 +0100)
When the guest(pv-on-hvm guest that cannot suspend) reboot in
LiveMigration, the disconnecting of src-side is not transmitted to
dist-side. As a result, the error processing on the dist side is not
executed.

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/python/xen/xend/XendDomain.py

index 520b881ee3994c2027ac6fb982c55b5c4d890f31..a8ac3174222e68dfa32b43d19f0caf484faabc63 100644 (file)
@@ -1353,7 +1353,7 @@ class XendDomain:
                 XendCheckpoint.save(p2cwrite, dominfo, True, live, dst,
                                     node=node)
             finally:
-                sock.shutdown()
+                sock.shutdown(2)
                 sock.close()
 
             os.close(p2cread)
@@ -1379,6 +1379,7 @@ class XendDomain:
                 XendCheckpoint.save(sock.fileno(), dominfo, True, live,
                                     dst, node=node)
             finally:
+                sock.shutdown(2)
                 sock.close()
 
     def domain_save(self, domid, dst, checkpoint=False):